package com.epoint.mobileoa.ui.infopub;

import java.util.HashMap;
import java.util.Map;

import android.os.Message;

import com.epoint.mobileoa.bizlogic.SuperView;
import com.epoint.mobileoa.bizlogic.Task;
import com.epoint.mobileoa.db.DBHelp;
import com.epoint.mobileoa.http.HttpHelp;

/**
 * @author liyc
 * @time 2012-5-4 下午8:16:07
 * @annotation 
 */
public class InfoPubTask extends Task {

	/**
	 * @param con
	 * @param param
	 */
	public InfoPubTask(SuperView con, HashMap<String, Object> param) {
		super(con, param);
	}

	@Override
	public void exectue(Message mess) throws Exception {
		String content = getParam().get("content").toString();
		String title = getParam().get("title").toString();
		String infodate = getParam().get("infodate").toString();
		String infotype = getParam().get("infotype").toString();
		Map<String, String> params = new HashMap<String, String>();
		params.put("content", content);
		params.put("title", title);
		params.put("infodate", infodate);
		params.put("infotype", infotype);
		params.put("userguid", getFP().getUserguid());
		params.put("displayname", getFP().getDisplayname());
		String ouguid = DBHelp.getUserOuguid(getCon(), getFP().getUserguid());
		params.put("ouguid", ouguid);
		String bs = HttpHelp.post(getFP().getSeamurl()+"?requestType=informationPulish", params, null);
		setMessageToRefreshUI(mess, getCon(), bs);
	}

}
